/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author PARINYA
 */
@Entity
@Table(name = "src_cureplan_doctor")
@NamedQueries({
    @NamedQuery(name = "SrcCureplanDoctor.findAll", query = "SELECT s FROM SrcCureplanDoctor s"),
    @NamedQuery(name = "SrcCureplanDoctor.findById", query = "SELECT s FROM SrcCureplanDoctor s WHERE s.id = :id"),
    @NamedQuery(name = "SrcCureplanDoctor.findByPriceMinAccept", query = "SELECT s FROM SrcCureplanDoctor s WHERE s.priceMinAccept = :priceMinAccept"),
    @NamedQuery(name = "SrcCureplanDoctor.findByPriceMaxAccept", query = "SELECT s FROM SrcCureplanDoctor s WHERE s.priceMaxAccept = :priceMaxAccept"),
    @NamedQuery(name = "SrcCureplanDoctor.findByDateMinAccept", query = "SELECT s FROM SrcCureplanDoctor s WHERE s.dateMinAccept = :dateMinAccept"),
    @NamedQuery(name = "SrcCureplanDoctor.findByDateMaxAccept", query = "SELECT s FROM SrcCureplanDoctor s WHERE s.dateMaxAccept = :dateMaxAccept"),
    @NamedQuery(name = "SrcCureplanDoctor.findByAttachQuotation", query = "SELECT s FROM SrcCureplanDoctor s WHERE s.attachQuotation = :attachQuotation")})
public class SrcCureplanDoctor implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ID")
    private Long id;
    @Lob
    @Column(name = "Symptom")
    private String symptom;
    @Lob
    @Column(name = "RoomType")
    private String roomType;
    @Column(name = "PriceMin_Accept")
    private String priceMinAccept;
    @Column(name = "PriceMax_Accept")
    private String priceMaxAccept;
    @Column(name = "DateMin_Accept")
    private String dateMinAccept;
    @Column(name = "DateMax_Accept")
    private String dateMaxAccept;
    @Lob
    @Column(name = "Allergic_History")
    private String allergicHistory;
    @Lob
    @Column(name = "Disease_History")
    private String diseaseHistory;
    @Lob
    @Column(name = "Attach_History_Comment")
    private String attachHistoryComment;
    @Column(name = "Attach_Quotation")
    private String attachQuotation;
    @JoinColumn(name = "M_Specialist_ID", referencedColumnName = "ID")
    @ManyToOne
    private MSpecialist mSpecialist;
    @JoinColumn(name = "M_Hotel_ID", referencedColumnName = "ID")
    @ManyToOne
    private MHotel mHotel;
    @JoinColumn(name = "srv_cureplan_ID", referencedColumnName = "ID")
    @ManyToOne(optional = false)
    private SrvCureplan srvCureplan;

    public SrcCureplanDoctor() {
    }

    public SrcCureplanDoctor(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSymptom() {
        return symptom;
    }

    public void setSymptom(String symptom) {
        this.symptom = symptom;
    }

    public String getRoomType() {
        return roomType;
    }

    public void setRoomType(String roomType) {
        this.roomType = roomType;
    }

    public String getPriceMinAccept() {
        return priceMinAccept;
    }

    public void setPriceMinAccept(String priceMinAccept) {
        this.priceMinAccept = priceMinAccept;
    }

    public String getPriceMaxAccept() {
        return priceMaxAccept;
    }

    public void setPriceMaxAccept(String priceMaxAccept) {
        this.priceMaxAccept = priceMaxAccept;
    }

    public String getDateMinAccept() {
        return dateMinAccept;
    }

    public void setDateMinAccept(String dateMinAccept) {
        this.dateMinAccept = dateMinAccept;
    }

    public String getDateMaxAccept() {
        return dateMaxAccept;
    }

    public void setDateMaxAccept(String dateMaxAccept) {
        this.dateMaxAccept = dateMaxAccept;
    }

    public String getAllergicHistory() {
        return allergicHistory;
    }

    public void setAllergicHistory(String allergicHistory) {
        this.allergicHistory = allergicHistory;
    }

    public String getDiseaseHistory() {
        return diseaseHistory;
    }

    public void setDiseaseHistory(String diseaseHistory) {
        this.diseaseHistory = diseaseHistory;
    }

    public String getAttachHistoryComment() {
        return attachHistoryComment;
    }

    public void setAttachHistoryComment(String attachHistoryComment) {
        this.attachHistoryComment = attachHistoryComment;
    }

    public String getAttachQuotation() {
        return attachQuotation;
    }

    public void setAttachQuotation(String attachQuotation) {
        this.attachQuotation = attachQuotation;
    }

    public MSpecialist getMSpecialist() {
        return mSpecialist;
    }

    public void setMSpecialist(MSpecialist mSpecialist) {
        this.mSpecialist = mSpecialist;
    }

    public MHotel getMHotel() {
        return mHotel;
    }

    public void setMHotel(MHotel mHotel) {
        this.mHotel = mHotel;
    }

    public SrvCureplan getSrvCureplan() {
        return srvCureplan;
    }

    public void setSrvCureplan(SrvCureplan srvCureplan) {
        this.srvCureplan = srvCureplan;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SrcCureplanDoctor)) {
            return false;
        }
        SrcCureplanDoctor other = (SrcCureplanDoctor) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.SrcCureplanDoctor[id=" + id + "]";
    }

}
